package com.atguigu.reflect;

<<<<<<< HEAD
public class Demo08ClassInit extends Demo09ClassInitParent {

    private static String demoName = "demo name 2024~~~";
    public Demo08ClassInit() {
        System.out.println("[实例初始化] 创建对象时执行");
    }

    static {
        System.out.println("[类初始化][子类] Hello static block ...");
    }

=======
/**
 * Created by Smexy on 2024/4/1
 */
public class Demo08ClassInit extends Demo09ClassInitParent {

    public static String demoName = "demo name";
    public static final String constDemoName = "const demo name";

    static {
        System.out.println("[类初始化][子类初始化]初始化代码……");
    }

    public Demo08ClassInit() {
        System.out.println("[实例初始化]初始化代码……");
    }
>>>>>>> ed3d638f2213d62c7be449f1a0b4ae145cfe8d19

    public static void main(String[] args) {
        new Demo08ClassInit();
    }
}
